<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html>
<head>
    <title>首页</title>
    <script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script>
    <script>
        /*https://unpkg.com/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json*/
        L2Dwidget.init({
            "model": {
                jsonPath: "https://unpkg.com/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json",
                "scale": 1
            },
            "display": {
                "position": "right",
                "width": 110,
                "height": 150,
                "hOffset": 0,
                "vOffset": -20
            },
            "mobile": {
                "show": true,
                "scale": 0.5
            },
            "react": {
                "opacityDefault": 0.8,
                "opacityOnHover": 0.5
            }
        });
    </script>
    <%@ include file="commons_head.jsp"%>
</head>
<body>

<!-- 头部 -->
<jsp:include page="/header.jsp">
    <jsp:param value="1" name="flag"/>
</jsp:include>
<!--banner-->
<div class="banner">
    <div class="container">
        <h2 class="hdng"><a href="${pageContext.request.contextPath }/goods_detail?id=${scroll.id }">${scroll.name }</a><span></span>
        </h2>
        <p>今日精选推荐</p>
        <a class="banner_a" href="javascript:;" onclick="buy(${scroll.id })">立刻购买</a>
        <div class="banner-text">
            <a href="${pageContext.request.contextPath }/goods_detail?id=${scroll.id }">
                <img src="${pageContext.request.contextPath }${scroll.cover}" alt="${scroll.name }" width="350"
                     height="350">
            </a>
        </div>
    </div>
</div>
<!--//banner-->
<div class="subscribe2"></div>
<!--gallery-->
<div class="gallery">
    <div class="container">
        <div class="alert alert-danger">热销推荐</div>
        <div class="gallery-grids">
            <c:forEach items="${requestScope.hotList}" var="g">
                <div class="col-md-4 gallery-grid glry-two">
                    <a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">
                        <img src="${pageContext.request.contextPath }${g.cover}" class="img-responsive" alt="${g.name}"
                             width="350" height="350"/>
                    </a>
                    <div class="gallery-info galrr-info-two">
                        <p>
                            <span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
                            <a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">查看详情</a>
                        </p>
                        <a class="shop" href="javascript:" onclick="buy(${g.id})">立刻购买</a>
                        <div class="clearfix"></div>
                    </div>
                    <div class="galy-info">
                        <p>${g.typeName } > ${g.name }</p>
                        <div class="galry">
                            <div class="prices">
                                <h5 class="item_price">¥ ${g.price }</h5>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                </div>
            </c:forEach>
        </div>
        <div class="clearfix"></div>
        <div class="alert alert-info">新品推荐</div>
        <div class="gallery-grids">

            <c:forEach items="${requestScope.newList}" var="g">
                <div class="col-md-3 gallery-grid ">
                    <a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">
                        <img src="${pageContext.request.contextPath }${g.cover}" class="img-responsive"
                             alt="${g.name }"/>
                    </a>
                    <div class="gallery-info">
                        <p>
                            <span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
                            <a href="${pageContext.request.contextPath }/goods_detail?id=${g.id}">查看详情</a>
                        </p>
                        <a class="shop" href="javascript:;" onclick="buy(${g.id})">立刻购买</a>
                        <div class="clearfix"></div>
                    </div>
                    <div class="galy-info">
                        <p>${g.typeName } > ${g.name }</p>
                        <div class="galry">
                            <div class="prices">
                                <h5 class="item_price">¥ ${g.price }</h5>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                </div>
            </c:forEach>
        </div>
    </div>
</div>
<!--//gallery-->

<!--subscribe-->
<div class="subscribe"></div>
<!--//subscribe-->

<!-- 尾部 -->
<jsp:include page="/footer.jsp"/>
</body>
</html>